The "Extract Refactoring" Refactoring
نویسندگان
چکیده
There is a gap between refactoring tools and generalpurpose program transformation tools that has yet to be filled. Refactoring tools are easy to use and wellestablished, but provide only a limited number of options. On the other hand, program transformation tools are powerful but are viable only for large transformation tasks. We propose an approach in which a developer specifies transformations to a program by example, using an IDE plugin recording the programmer’s actions as changes. These changes could be generalized to specify a more abstract transformation, without the need of a dedicated syntax. Defining refactorings and transformations from concrete cases would enable more frequent uses of medium scale transformations.
منابع مشابه
An Investigation into the Characteristics of Methods for Extract Method Refactoring
“Extract Method” is a refactoring pattern that extracts a part of an existing method as a new method. Although extract method refactoring is an effective way to decompose long and non-cohesive methods in general, how developers choose methods for “Extract Method” refactoring is still unexamined. For supporting this refactoring, the investigation of it is neccessary. In this study, we investigat...
متن کاملIssues in Performing and Automating the “Extract Method Calls” Refactoring
A large part of converting a pre-AOP application into an aspect-oriented one consists, next to aspect mining, out of aspect refactoring. One such aspect refactoring named “Extract Method Calls” refactoring [11, 17] transforms certain crosscutting concerns which are implemented by calls to a single method into an aspect by turning the called method into an advice and all the calls to that method...
متن کاملJExtract: An Eclipse Plug-in for Recommending Automated Extract Method Refactorings
Although Extract Method is a key refactoring for improving program comprehension, refactoring tools for such purpose are often underused. To address this shortcoming, we present JExtract, a recommendation system based on structural similarity that identifies Extract Method refactoring opportunities that are directly automated by IDE-based refactoring tools. Our evaluation suggests that JExtract...
متن کاملIdentification of extract method refactoring opportunities for the decomposition of methods
The extraction of a code fragment into a separate method is one of the most widely performed refactoring activities, since it allows the decomposition of large and complex methods and can be used in combination with other code transformations for fixing a variety of design problems. Despite the significance of Extract Method refactoring towards code quality improvement, there is limited support...
متن کاملComposite Refactorings: The Next Refactoring Rubicons
The industry crossed the first refactoring rubicon, namely Extract Method, more than a decade ago. Today, all mainstream Integrated Development Environments (IDEs) support this refactoring, and empirical studies have shown that Extract Method is one of the most frequently used automated refactorings. Although complex refactorings are more tedious and error-prone, studies have shown that program...
متن کاملDeriving Extract Method Refactoring Suggestions for Long Methods
The extract method is a common way to shorten long methods in software development. Before developers can use tools that support the extract method, they need to invest time in identifying a suitable refactoring candidate. This paper addresses the problem of finding the most appropriate refactoring candidate for long methods written in Java. The approach determines valid refactoring candidates ...
متن کامل